public class homewolk {
    public static void main(String[] args) {
        //复习汉若塔
        hannuo(1,'A','B','c');
        System.out.println();
        hannuo(2,'A','B','C');
        System.out.println();
        hannuo(4,'A','B','C');
    }

    public static void move(char pos1,char pos2){
        System.out.print(" pos1 -> pos2");
    }
    //n表示层数
    //pos1表示起始位置
    //pos2表示过度位置
    //pos3表示终点位置
    public static void hannuo(int n,char pos1,char pos2,char pos3){
        if(n == 1){
            System.out.print("pos1 -> pos3");
        }else {
            hannuo(n - 1, pos1, pos3, pos2);
            move(pos1, pos3);
            hannuo(n - 1, pos2, pos1, pos3);
        }
    }
}
